from flask import Flask, request, jsonify
import config
from blueprints.qa import bp as qa_blue
from blueprints.user import bp as user_blue

app = Flask(__name__)
app.config.from_object(config)
app.register_blueprint(qa_blue)
app.register_blueprint(user_blue)

# @app.route('/')
# def hello_world():  # put application's code here
#     return '主页修改'
#
#
# # 带参的 url <int:id> 指定id为整形
# @app.route('/test/<id>')
# def hello_world_test(id):  # put application's code here
#     return '访问的id为 %s' % id
#
#
# @app.route('/test0', methods=['POST'])
# def hello_world_test0():
#     data = request.get_json()
#     name = data.get('name')
#     return jsonify({'name': 'post请求: %s' % name})


if __name__ == '__main__':
    app.run(port=9000, debug=True)
